package com.jrzh.db.migration.sys;

import com.jrzh.framework.migration.BaseMigration;
import com.jrzh.framework.migration.MigrationHelper;

public class Migration_10 extends BaseMigration {
	private final static String TABLE_NAME="sys_login_logs";
	
	@Override
	public void down() {
		MigrationHelper.dropTable(TABLE_NAME);
	}

	@Override
	public void up() {
		log.info("##########执行Sys模块 Migration_10##########Begin");
		table(TABLE_NAME, "登陆日志", true, pk(),
				jrChar("_user_id","关联用户id", 36),
				jrTimestamp("_login_time", "登录时间"),
				jrInt("_type", "1====登陆 ，2=====退出"),
				jrTimestamp("_login_out_time", "退出时间"),
				jrVarchar("_mac_address", "mac地址", 512),
				jrVarchar("_ip", "ip地址", 512),
				jrVarchar("_description", "描述", 512)
		);
		log.info("##########执行Sys模块 Migration_10##########Begin");
	}

}
